﻿<UserControl x:Class="KTVConsole2.UI.UserControlSongPlayedDisplayBySong"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">
    <Grid>
        <ListView Name="listView1" Grid.ColumnSpan="2" DataContext="{Binding}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="歌曲" DisplayMemberBinding="{Binding Path=Song.SongName}" Width="300" />
                    <GridViewColumn Header="歌手" DisplayMemberBinding="{Binding Path=Song.Star}" />
                    <GridViewColumn Header="点播次数" DisplayMemberBinding="{Binding Path=Frequency}"/>
                    <GridViewColumn Header="操作">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Button Content="删除" Name="BtnDelete" Click="BtnDelete_Click" Tag="{Binding}"/>
                                    <Button Content="点播" Name="BtnPlay" Click="BtnPlay_Click" Tag="{Binding}"/>
                                </StackPanel>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
